
#ifndef MSE_PID_H
#define MSE_PID_H

#include "stdint.h"
#include "MSE_MOTOR.h"
#include "MSE_MATH.h"
#include "MY_define.h"
#include "FFC.h"
#include "bsp_dwt.h"

/*PID通用赋值函数*/
uint8_t MSE_F_MOTOR_PID_COMMON_INIT(struct MSE_MOTOR_Typedef* MOTOR , uint8_t MOD , float* PID_S , float* PID_P);
/*PID电流环赋值*/
void MSE_F_MOTOR_PID_CURRENT_INIT(struct MSE_MOTOR_Typedef* MOTOR , float* PID_C);
/*底盘部分PID赋值*/
uint8_t MSE_F_MOTOR_PID_BOTTOM_INIT(void);
/*头部部分PID赋值*/
uint8_t MSE_F_MOTOR_PID_HEAD_INIT(void);

/*底盘电流速度环PID*/
void MSE_F_MOTOR_CHSISS_3508RM(struct MSE_MOTOR_Typedef* MOTOR);
/*3508单速度环解算*/
void MSE_F_MOTOR_PID_SPEED_3508RM(struct MSE_MOTOR_Typedef* MOTOR);
/*3508双环解算*/
void MSE_F_MOTOR_PID_TWO_3508RM(struct MSE_MOTOR_Typedef* MOTOR);
/*2006双环解算*/
void MSE_F_MOTOR_PID_TWO_2006RM(struct MSE_MOTOR_Typedef* MOTOR);
/*2006单环解算,陀螺仪提供角度*/
void MPU_MOTOR_PID_ONE_2006RM(struct MSE_MOTOR_Typedef* MOTOR,float Aim_Angle,float Date_MPU_Angle);
/*6020双环解算*/
void MSE_F_MOTOR_PID_TWO_6020RM(struct MSE_MOTOR_Typedef* MOTOR);

void MSE_F_MOTOR_PID_CURRENT_INIT(struct MSE_MOTOR_Typedef* MOTOR , float* PID_C);
#endif
